<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

    

    <title>Win常用开发工具整理 | 竹隐江南的博客</title>
    <meta name="author" content="dzy20@qq.com">
    
    <meta name="description" content="开发工具">
    
    
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

    <meta property="og:title" content="Win常用开发工具整理"/>
    <meta property="og:site_name" content="必须有人浴血奋战，世上才有自由可言！"/>

    
    <meta property="og:image" content="undefined"/>
    

    <link rel="icon" type="image/png" href="/favicon.png">
    <link rel="alternate" href="/atom.xml" title="必须有人浴血奋战，世上才有自由可言！" type="application/atom+xml">
    <link rel="stylesheet" href="/css/lib/materialize.min.css">
    <link rel="stylesheet" href="/css/lib/font-awesome.min.css">
    <link rel="stylesheet" href="/css/style.css" media="screen" type="text/css">

    
        <link rel="stylesheet" href="/css/lib/prettify-tomorrow-night-eighties.css" type="text/css">
    
    <!--[if lt IE 9]><script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
</head>


<body>
    <img src="/weixin_favicon.png" style="position: absolute; left: -9999px; opacity: 0; filter: alpha(opacity=0);">

    <nav class="green">
    <div class="nav-wrapper">
        <a href="#" data-activates="main-menu" class="button-collapse">
            <i class="fa fa-navicon"></i>
        </a>
        <div class="">
            <a href="/" class="brand-logo hide-on-med-and-down">必须有人浴血奋战，世上才有自由可言！</a>
            <ul class="right hide-on-med-and-down">
                
                    <li>
                        <a class="menu-home " href="/" >
                            <i class="fa fa-home "></i>
                            
                            首页
                        </a>
                    </li>
                
                    <li>
                        <a class="menu-archive " href="/archives" >
                            <i class="fa fa-archive "></i>
                            
                            归档
                        </a>
                    </li>
                
                    <li>
                        <a class="menu-category category-menu" href="javascript:;" data-activates="category-menu" >
                            <i class="fa fa-bookmark "></i>
                            
                            分类
                        </a>
                    </li>
                
                    <li>
                        <a class="menu-reading " href="/reading" >
                            <i class="fa fa-book "></i>
                            
                            读书
                        </a>
                    </li>
                
                    <li>
                        <a class="menu-about " href="/about" >
                            <i class="fa fa-user "></i>
                            
                            关于
                        </a>
                    </li>
                
                    <li>
                        <a class="menu-search modal-trigger " href="#search" >
                            <i class="fa fa-search "></i>
                            
                            搜索
                        </a>
                    </li>
                
            </ul>
            <div>
    <ul class="side-nav green darken-1" id="main-menu">
        
        <li class="side-user">
            <div class="row">
                <div class="col s4 no-padding">
                    <img class="avatar-image circle responsive-img" src="https://static.oschina.net/uploads/user/728/1456911_100.jpg?t=1393495702000" alt="User Avatar">
                </div>
                <div class="info col s8 valign-wrapper no-padding">
                    <div class="valign">
                        <p class="name">竹隐江南</p>
                        <p class="desc">Java后端/技术宅</p>
                    </div>
                </div>
            </div>
        </li>
        

        
            <li class="no-padding">
                <a class="waves-effect menu-home " href="/" >
                    <i class="fa fa-home "></i>
                    
                    首页
                </a>
            </li>
        
            <li class="no-padding">
                <a class="waves-effect menu-archive " href="/archives" >
                    <i class="fa fa-archive "></i>
                    
                    归档
                </a>
            </li>
        
            <li class="no-padding">
                <a class="waves-effect menu-category category-menu" href="javascript:;" data-activates="category-menu" >
                    <i class="fa fa-bookmark "></i>
                    
                    分类
                </a>
            </li>
        
            <li class="no-padding">
                <a class="waves-effect menu-reading " href="/reading" >
                    <i class="fa fa-book "></i>
                    
                    读书
                </a>
            </li>
        
            <li class="no-padding">
                <a class="waves-effect menu-about " href="/about" >
                    <i class="fa fa-user "></i>
                    
                    关于
                </a>
            </li>
        
            <li class="no-padding">
                <a class="waves-effect menu-search modal-trigger " href="#search" >
                    <i class="fa fa-search "></i>
                    
                    搜索
                </a>
            </li>
        
    </ul>

    <ul class="side-nav green darken-1" id="category-menu">
    

            

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/categories/hive/">
                    hive <span class="right">2 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/categories/Docker/">
                    Docker <span class="right">10 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/categories/操作系统/">
                    操作系统 <span class="right">7 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/categories/系统架构/">
                    系统架构 <span class="right">2 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/categories/DevOps-CI/">
                    DevOps-CI <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/categories/SSL/">
                    SSL <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/categories/springboot/">
                    springboot <span class="right">8 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/categories/Linux/">
                    Linux <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/categories/Linux/Tomcat/">
                    Tomcat <span class="right">1 篇</span></a>
                </a>
            </li>

        

    </ul>
</div>

        </div>
    </div>
</nav>

<div id="search" class="modal search-modal">
    <div class="row">
        <div class="input-field col s12">
              <input id="search-input" type="text">
              <label for="search-input">搜索</label>
        </div>

    </div>
    <div id="search-result" class="search-result col s12">

    </div>
</div>


    <main>
        <div class="container main-container">
    <nav class="page-nav hide-on-small-only">
    <div class="nav-wrapper green">
        <span class="breadcrumb">当前位置（分类目录）</span>
        
            
    
    
    <a class="breadcrumb" href="/categories/操作系统/">操作系统</a>


        

        
    </div>
</nav>

<article>
    <div class="card">
        <div class="card-content">
            

            <div class="article-title">
                
    
        <h1>Win常用开发工具整理</h1>
    


            </div>
            <time class="red-link-context" datetime="2018-07-04T01:56:00.000Z"><a href="/2018/07/04/Win开发常用工具整理/">2018-07-04</a></time>

            <span id="busuanzi_container_page_pv" class="read-times-container">
    <i class="fa fa-eye"></i>
    <span id="busuanzi_value_page_pv"></span>
</span>

            
    <div class="tags-row">
        
            <a href="/tags/Windndows/" class="chip red lighten-1">Windndows</a>
        
            <a href="/tags/开发工具/" class="chip red lighten-1">开发工具</a>
        
    </div>


            <div class="toc red-link-context hide-on-med-and-down">
    <ol class="section table-of-contents"><li class="section table-of-contents-item section table-of-contents-level-1"><a class="section table-of-contents-link" href="#Windows常用工具整理"><span class="section table-of-contents-text">Windows常用工具整理</span></a><ol class="section table-of-contents-child"><li class="section table-of-contents-item section table-of-contents-level-2"><a class="section table-of-contents-link" href="#安装工具"><span class="section table-of-contents-text">安装工具</span></a></li><li class="section table-of-contents-item section table-of-contents-level-2"><a class="section table-of-contents-link" href="#Chrome插件"><span class="section table-of-contents-text">Chrome插件</span></a></li><li class="section table-of-contents-item section table-of-contents-level-2"><a class="section table-of-contents-link" href="#开发相关"><span class="section table-of-contents-text">开发相关</span></a><ol class="section table-of-contents-child"><li class="section table-of-contents-item section table-of-contents-level-3"><a class="section table-of-contents-link" href="#开发工具：IntelliJ-IDEA-没有之一"><span class="section table-of-contents-text">开发工具：IntelliJ IDEA 没有之一</span></a></li><li class="section table-of-contents-item section table-of-contents-level-3"><a class="section table-of-contents-link" href="#RestfulToolkit"><span class="section table-of-contents-text">RestfulToolkit </span></a></li><li class="section table-of-contents-item section table-of-contents-level-3"><a class="section table-of-contents-link" href="#Translation"><span class="section table-of-contents-text">Translation</span></a></li><li class="section table-of-contents-item section table-of-contents-level-3"><a class="section table-of-contents-link" href="#Grep-Console"><span class="section table-of-contents-text">Grep Console</span></a></li><li class="section table-of-contents-item section table-of-contents-level-3"><a class="section table-of-contents-link" href="#Alibaba-Java-Coding-Guidelines"><span class="section table-of-contents-text">Alibaba Java Coding Guidelines</span></a></li><li class="section table-of-contents-item section table-of-contents-level-3"><a class="section table-of-contents-link" href="#Rainbow-Brackets"><span class="section table-of-contents-text">Rainbow Brackets</span></a></li><li class="section table-of-contents-item section table-of-contents-level-3"><a class="section table-of-contents-link" href="#MyBatis-Log-Plugin"><span class="section table-of-contents-text">MyBatis Log Plugin</span></a></li><li class="section table-of-contents-item section table-of-contents-level-3"><a class="section table-of-contents-link" href="#ignore"><span class="section table-of-contents-text">.ignore</span></a></li><li class="section table-of-contents-item section table-of-contents-level-3"><a class="section table-of-contents-link" href="#BackgroundImage"><span class="section table-of-contents-text">BackgroundImage</span></a></li><li class="section table-of-contents-item section table-of-contents-level-3"><a class="section table-of-contents-link" href="#Cmder"><span class="section table-of-contents-text">Cmder</span></a></li></ol></li></ol></li></ol>
</div>


            <div class="entry red-link-context">
                <p><em>长期开发积累的一些常用工具，每次重装系统的时候总是怕忘记，做个汇总</em></p>
<h1 id="Windows常用工具整理"><a href="#Windows常用工具整理" class="headerlink" title="Windows常用工具整理"></a>Windows常用工具整理</h1><h2 id="安装工具"><a href="#安装工具" class="headerlink" title="安装工具"></a>安装工具</h2><ul>
<li><strong>快速启动工具 WOX</strong><br>地址：<a href="https://github.com/Wox-launcher/Wox/releases" target="_blank" rel="external">https://github.com/Wox-launcher/Wox/releases</a><br>  快速启动应用+文件搜索+各种实用插件（计算器、翻译、网页快速访问等）</li>
<li><strong>搜索工具：everything</strong><br>一直都用的搜索工具，第一次安装完后会建立索引，后面搜索秒出所有，可以和WOX结合使用</li>
</ul>
<a id="more"></a> 
<ul>
<li><p><strong>截图工具：snipaste（国产免费）/Screenpresso(咳咳超好用费用嘛)</strong><br>snipaste 截图快捷，国产，免费，比QQ截图清晰。<br>  Screenpresso 强大的代表词，用过的都知道，自带录屏功能。</p>
</li>
<li><p><strong>下载工具：IDM</strong><br>http类型的下载工具，chrome下载都交给他了。安装这个工具会提示安装谷歌插件，必须安装可以下载百度云离线文件，突破下载限制。</p>
</li>
<li><p><strong>快速预览工具：QuickLook</strong><br>一款可以让windows拥有mac的预览功能工具，鼠标选中文件，空格键预览。微软商店中就有。</p>
</li>
<li><p><strong>Markdown工具</strong><br>我试过各种markdown工具，介绍两款最好。<br>  如果你的Markdown语法使用特别的熟练，那么我强烈的推荐你使用：Typora<br>  如果你的书写没有那么流利，那么我强烈推荐你使用Haroopad这个工具，等着用熟练了在用Typora。</p>
</li>
<li><p><strong>图床工具PicGo</strong> </p>
<p>当你写Markdown文章的时候，上传图片是一个很费心的事情。这个工具就是解决这个问题的 </p>
</li>
<li><p><strong>压缩工具BandZIP</strong> </p>
<p>自从他出世以后，其他的压缩工具我再也没有用过了。</p>
</li>
<li><p><strong>文件夹工具XYplorer </strong></p>
<p>写文档或者开发的时候打开N多的文件夹，找来找去太多了不好管理，不好找？试试这个</p>
</li>
<li><p><strong>纸飞机Shadowsocks</strong></p>
<p>纸飞机，墙软件，前提你在国外有代理服务器，好用谁用谁知道。</p>
</li>
</ul>
<h2 id="Chrome插件"><a href="#Chrome插件" class="headerlink" title="Chrome插件"></a>Chrome插件</h2><ul>
<li><p><strong>Tampermonkey </strong></p>
<p>用过的人都知道，万千司机中万千个油猴，强大的各种脚本可以帮你做如下事情。</p>
<p>比如：开车，百度网盘破解直接下载，VIP视频在线解析，去除视频广告等等。</p>
</li>
<li><p><strong>Imagus</strong></p>
<p>鼠标悬浮图片上，浮现大图，再也不用右键-&gt;新标签页打开看大图了。</p>
</li>
<li><p><strong>OneTab </strong></p>
<p>这个工具超级有用！！！！我知道大家都习惯用好多书签管理工具，这个呢是为了解决你查询问题，有很多标签页都有用，但是太多了，这时候你点一下全部就收缩起来，释放内存，下载打开浏览器还在收集页中，而且可以导出。</p>
</li>
<li><p><strong>谷歌访问助手</strong></p>
<p>这个是360的？反正是如果你需要访问谷歌搜索，这个工具是够用了。但是不能墙哦，我是良民，墙都是用纸飞机的。</p>
</li>
<li><p><strong>Adblock Plus</strong></p>
<p>网页去广告插件，去除各种亮闪闪的广告。</p>
</li>
<li><p><strong>Modify Header</strong></p>
<p>修改浏览器请求头信息，用来调试开发或者测试一些网站，咳咳~</p>
</li>
<li><p><strong>Axure RP Extension for Chrome </strong></p>
<p>可以让你用chrome打开AP设计的原型</p>
</li>
<li><p><strong>GitCodeTree </strong></p>
<p>用来访问gitee.com的插件，可以像开发一样在左侧生成树，再也不用下载整个项目后进行查看了。可以单独下载一个文件哦。</p>
</li>
<li><p><strong>JSON Formatter </strong></p>
<p>响应数据为JSON的时候自动格式化，便于查看，再也不用把相应的JSON格式复制出来，单独找JSON格式化网站进行格式化了。</p>
</li>
<li><p><strong>Octotree </strong></p>
<p>访问github.com网站的神器，GitCodeTree就是基于它开发的，可以像开发一样在左侧生成树，再也不用下载整个项目后进行查看了。可以单独下载一个文件哦。</p>
</li>
</ul>
<h2 id="开发相关"><a href="#开发相关" class="headerlink" title="开发相关"></a>开发相关</h2><ul>
<li><h3 id="开发工具：IntelliJ-IDEA-没有之一"><a href="#开发工具：IntelliJ-IDEA-没有之一" class="headerlink" title="开发工具：IntelliJ IDEA 没有之一"></a><strong>开发工具：IntelliJ IDEA 没有之一</strong></h3><p>用了5年的eclipse的老用户，后来切IDEA，用了几个周后发现，这个是真的非常好用，神器建议更换为它，前端的也可以用IntelliJ Storm开发。</p>
</li>
<li><h3 id="RestfulToolkit"><a href="#RestfulToolkit" class="headerlink" title="RestfulToolkit "></a><strong>RestfulToolkit </strong></h3><p>Java WEB开发必备，再也不用全局搜索RequestMapping了 。简单点说就是直接搜索请求的。</p>
</li>
<li><h3 id="Translation"><a href="#Translation" class="headerlink" title="Translation"></a>Translation</h3><p>翻译插件，很好用。这个看个人喜好了。</p>
</li>
<li><h3 id="Grep-Console"><a href="#Grep-Console" class="headerlink" title="Grep Console"></a>Grep Console</h3><p>高亮显示Log不同级别的日志，看日志一目了然。</p>
</li>
<li><h3 id="Alibaba-Java-Coding-Guidelines"><a href="#Alibaba-Java-Coding-Guidelines" class="headerlink" title="Alibaba Java Coding Guidelines"></a>Alibaba Java Coding Guidelines</h3><p>阿里巴巴的Java代码规范插件</p>
</li>
<li><h3 id="Rainbow-Brackets"><a href="#Rainbow-Brackets" class="headerlink" title="Rainbow Brackets"></a>Rainbow Brackets</h3><p>彩虹括号，自动给代码内的括号加色，视野更清晰</p>
</li>
<li><h3 id="MyBatis-Log-Plugin"><a href="#MyBatis-Log-Plugin" class="headerlink" title="MyBatis Log Plugin"></a><strong>MyBatis Log Plugin</strong></h3><p>开发都用mybatis了吧，日志都打印出来了吧，打印的sql是？？？参数也独立出来，怎么合并了？用这个，选择右键，然后复制粘贴就能立刻执行了。</p>
</li>
<li><h3 id="ignore"><a href="#ignore" class="headerlink" title=".ignore"></a><strong>.ignore</strong></h3><p>git忽略插件，再也不用手写匹配规则了。</p>
</li>
<li><h3 id="BackgroundImage"><a href="#BackgroundImage" class="headerlink" title="BackgroundImage"></a><strong>BackgroundImage</strong></h3><p>IDEA的背景图，比如我就设置的结婚照，车等等。</p>
</li>
</ul>
<hr>
<ul>
<li><p><strong>数据库链接工具dbeaver</strong></p>
<p>以前数据库链接不同的数据库我会用不同的工具，直到用linux开发大数据的时候，用了这个工具，然后发现是跨平台的，就用这个工具了，用了这个工具后，市面上有得数据库基本全涵盖了。</p>
</li>
<li><p><strong>终端工具MobaXterm </strong></p>
<p>说起终端工具，收费的Xshell 系列家族，如果不想用收费，不想破解，可以用一下这个工具，神器！</p>
</li>
<li><h3 id="Cmder"><a href="#Cmder" class="headerlink" title="Cmder"></a><strong>Cmder</strong></h3><p>替换CMD工具，这个工具字体颜色，选择，窗口大小，模拟shell命令，<strong>多个tab管理</strong>，等等。</p>
<p>我现在不用了是因为我用WOX中直接调用powershell了。</p>
</li>
<li><p><strong>调试工具 PostMan</strong></p>
<p>这个开发的应该都知道，IDEA自带感觉没有这个强大</p>
</li>
<li><p><strong>API管理平台</strong></p>
</li>
</ul>
<ol>
<li>Hitchhiker</li>
<li>eoLinker</li>
<li>apidocjs</li>
</ol>

                
<p class="red-link-context">
    <a href="/2018/07/06/Docker容器初级学习（一）安装/" rel="next" title="Docker容器初级学习（一）安装及配置">
    上一篇：Docker容器初级学习（一）安装及配置
  </a>
</p>



<p class="red-link-context">
    <a href="/2017/10/26/Jenkins持续构建（初级版本）/" rel="next" title="Jenkins持续构建（初级版本）">
    下一篇：Jenkins持续构建（初级版本）
  </a>
</p>


            </div>
			
        </div>
    </div>
</article>




    <section id="comment">
        <div class="card">
            <div class="card-content">
                <!-- Duoshuo Comment BEGIN -->
                <div class="ds-thread" data-thread-key="2018/07/04/Win开发常用工具整理/" data-title="Win常用开发工具整理" data-url="http://dengzy007hi.oschina.io/2018/07/04/Win开发常用工具整理/"></div>

                <script type="text/javascript">
                    console.log(document.querySelector('.ds-thread'));
                    var duoshuoQuery = {
                        short_name: 'dengzy007hi'
                    };
                    (function() {
                        var ds = document.createElement('script');
                        ds.type = 'text/javascript';
                        ds.async = true;
                        ds.src = (document.location.protocol == 'https:'
                            ? 'https:'
                            : 'http:') + '//static.duoshuo.com/embed.js';
                        ds.charset = 'UTF-8';
                        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ds);
                    })();
                </script>
                <!-- Duoshuo Comment END -->
            </div>
        </div>
    </section>



</div>

        <div class="fixed-action-btn float-sitemap">
    <a class="btn-floating btn-large red">
      <i class="fa fa-caret-square-o-up"></i>
    </a>
    <ul>
      <li><a class="btn-return-top btn-floating waves-effect cyan" title="回到顶部"><i class="fa fa-arrow-circle-o-up"></i></a></li>
      <li><a class="btn-floating waves-effect button-collapse light-green"  data-activates="main-menu" title="menu"><i class="fa fa-navicon"></i></a></li>
    </ul>
  </div>

    </main>
    <footer class="page-footer green darken-1">
    
    <div class="container">
        <div class="row">
            
            <div class="social-group col m4 s12">
                <h5 class="white-text">社交</h5>
                
                    <a class="social-link" href="http://weibo.com/bambooJN" target="_blank">
                        <i class="fa fa-2x fa-weibo"></i>
                    </a>
                
                    <a class="social-link" href="https://git.oschina.net/dengzy007hi" target="_blank">
                        <i class="fa fa-2x fa-github"></i>
                    </a>
                
                    <a class="social-link" href="/atom.xml" target="_blank">
                        <i class="fa fa-2x fa-rss"></i>
                    </a>
                
                <div class="site-visitors-container white-text">
                    <span>
                        <i class="fa fa-user"></i>
                        <span class="busuanzi-value" id="busuanzi_value_site_uv"></span>
                    </span>
                    <span>&nbsp;|&nbsp;</span>
                    <span>
                        <i class="fa fa-eye"></i>
                        <span class="busuanzi-value" id="busuanzi_value_site_pv"></span>
                    </span>
                </div>
            </div>
            

            
            <div class="col m8 s12">
                <h5 class="white-text">友情链接</h5>
                
                    <a class="social-link" href="https://www.oschina.net" target="_blank">开源中国</a>
                
                    <a class="social-link" href="http://jdkleo.iteye.com/" target="_blank">JDKLEO</a>
                
                    <a class="social-link" href="http://pkaq.org/" target="_blank">如是我闻</a>
                
            </div>
            
        </div>
    </div>
    

    <div class="footer-copyright red-link-context">
        <div class="container">
            © 2017 dzy20@qq.com, All rights reserved.
            <p class="right" style="margin-top: 0;">本博客由 <a href="https://hexo.io">Hexo</a> 强力驱动 | 主题 <a href="https://github.com/raytaylorlin/hexo-theme-raytaylorism">raytaylorism</a></p>
        </div>
    </div>
</footer>


    <noscript>
    <div class="noscript">
        <p class="center-align">当前网速较慢或者你使用的浏览器不支持博客特定功能，请尝试刷新或换用Chrome、Firefox等现代浏览器</p>
    </div>
</noscript>
<div class="noscript">
    <p class="center-align">当前网速较慢或者你使用的浏览器不支持博客特定功能，请尝试刷新或换用Chrome、Firefox等现代浏览器</p>
</div>


<script src="/js/jquery.min.js"></script>
<script src="/js/materialize.min.js"></script>
<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js">
</script>

<script>
    (function($) {
        $(document).ready(function() {
            // 隐藏禁用javascript（针对微信内置浏览器）的提示
            $('.noscript').hide();

            // 图片缩放效果
            var $imgs = $('img').not('.slider-image').not('.avatar-image').not('.carousel-image').not('.card-cover-image').not('.qrcode');

            // 给图片加上点击放大效果（materialbox插件）
            $imgs.addClass('materialboxed').each(function(i, el) {
                $(this).attr('data-caption', $(this).attr('alt') || ' ');
            }).materialbox();

            // 优化表格的显示
            $('table').each(function() {
                var $table = $(this);
                // 除去多行代码的情况
                if ($table.find('pre').length == 0) {
                    $table.addClass('responsive-table striped bordered');
                }
            });

            // 首页幻灯片
            $('.slider').slider({indicators: true, full_width: true, interval: 8000});

            $(".button-collapse").sideNav();
            $(".category-menu").sideNav();

            // 针对gallery post
            $('.carousel').carousel({full_width: true});
            $('.carousel-control.prev').click(function() {
                $('.carousel').carousel('prev');
            });
            $('.carousel-control.next').click(function() {
                $('.carousel').carousel('next');
            });

            // 文章目录
            $('article').not('.simple-article').find('h1').add('h2').add('h3').add('h4').add('h5').add('h6').scrollSpy();

            // 目录随屏幕滚动（防止目录过长越过footer）
            var $toc = $('.toc');
            var scrollTargetTop = 0;
            $(window).scroll(function() {
                var $activeLink = $toc.find('a.active.section');
                if ($(window).scrollTop() < 100) {
                    scrollTargetTop = 0;
                } else {
                    if ($activeLink[0]) {
                        scrollTargetTop = $activeLink.offset().top - $toc.offset().top;
                    }
                }
                $toc.css('top', '-' + scrollTargetTop + 'px');
            });

            // 修正文章目录的left-border颜色
            var color = $('.table-of-contents-text').css('color');
            $('.table-of-contents-link').css('border-left-color', color);

            // 针对移动端做的优化：FAB按钮点击一下收回
            if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
                $('.fixed-action-btn').addClass('click-to-toggle');
            }
            // 回到顶部
            $('.btn-return-top').click(function() {
                $('body, html').animate({
                    scrollTop: 0
                }, 500);
            });

            // 重置读书页面的Tab标签页的颜色
            $('li.tab a').hover(function() {
                $(this).toggleClass('text-lighten-4');
            });
            $('.indicator').addClass('red lighten-2');

            
            // 添加new标签
            $('.menu-about').append('<span class="new badge red"></span>');
            

            // 搜索功能
            $('.modal-trigger').leanModal({
                // 打开搜索框时自动聚焦
                ready: function() {
                    if ($('#search').is(":visible")) {
                        $('#search-input').focus();
                    }
                }
            });
            var searchXml = "search.xml";
            if (searchXml.length == 0) {
             	searchXml = "search.xml";
            }
            var searchPath = "/" + searchXml;
            initSearch(searchPath, 'search-input', 'search-result');
        });

        // 初始化搜索与匹配函数
        var initSearch = function(path, search_id, content_id) {
            'use strict';
            $.ajax({
                url: path,
                dataType: "xml",
                success: function(xmlResponse) {
                    // get the contents from search data
                    var datas = $("entry", xmlResponse).map(function() {
                        return {
                            title: $("title", this).text(),
                            content: $("content", this).text(),
                            url: $("url", this).text()
                        };
                    }).get();
                    var $input = document.getElementById(search_id);
                    var $resultContent = document.getElementById(content_id);
                    $input.addEventListener('input', function() {
                        var str = '<ul class=\"search-result-list\">';
                        var keywords = this.value.trim().toLowerCase().split(/[\s\-]+/);
                        $resultContent.innerHTML = "";
                        if (this.value.trim().length <= 0) {
                            return;
                        }
                        // perform local searching
                        datas.forEach(function(data) {
                            var isMatch = true;
                            var content_index = [];
                            var data_title = data.title.trim().toLowerCase();
                            var data_content = data.content.trim().replace(/<[^>]+>/g, "").toLowerCase();
                            var data_url = data.url;
                            var index_title = -1;
                            var index_content = -1;
                            var first_occur = -1;
                            // only match artiles with not empty titles and contents
                            if (data_title != '' && data_content != '') {
                                keywords.forEach(function(keyword, i) {
                                    index_title = data_title.indexOf(keyword);
                                    index_content = data_content.indexOf(keyword);
                                    if (index_title < 0 && index_content < 0) {
                                        isMatch = false;
                                    } else {
                                        if (index_content < 0) {
                                            index_content = 0;
                                        }
                                        if (i == 0) {
                                            first_occur = index_content;
                                        }
                                    }
                                });
                            }
                            // show search results
                            if (isMatch) {
                                keywords.forEach(function(keyword) {
                                    var regS = new RegExp(keyword, "gi");
                                    data_title = data_title.replace(regS, "<span class=\"search-keyword red lighten-2\">" + keyword + "</span>");
                                });

                                str += "<li><a href='" + data_url + "' class='search-result-title'>" + data_title + "</a>";
                                var content = data.content.trim().replace(/<[^>]+>/g, "");
                                if (first_occur >= 0) {
                                    // cut out 100 characters
                                    var start = first_occur - 20;
                                    var end = first_occur + 80;
                                    if (start < 0) {
                                        start = 0;
                                    }
                                    if (start == 0) {
                                        end = 100;
                                    }
                                    if (end > content.length) {
                                        end = content.length;
                                    }
                                    var match_content = content.substring(start, end);
                                    // highlight all keywords
                                    keywords.forEach(function(keyword) {
                                        var regS = new RegExp(keyword, "gi");
                                        match_content = match_content.replace(regS, "<span class=\"search-keyword red lighten-2\">" + keyword + "</span>");
                                    });

                                    str += "<p class=\"search-result\">..." + match_content + "...</p>"
                                }
                                str += "</li>";
                            }
                        });
                        str += "</ul>";
                        $resultContent.innerHTML = str;
                    });
                }
            });
        }
    })(jQuery);
</script>


<script src="/js/prettify.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
        $("pre").addClass("prettyprint");
        prettyPrint();
    });
</script>








</body>
</html>
